package cn.ynrcb.personnelfile.sysadmin.vo;

import cn.ynrcb.personnelfile.common.validator.group.AddGroup;
import cn.ynrcb.personnelfile.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 用户Vo类
 */
public interface UserVo {

    /**
     * 用户登录信息Vo
     */
    @Data
    class UserLoginVo {
        /**
         * 用户ID
         */
        private Long userId;

        /**
         * 角色ID
         */
        private Integer roleId;

        /**
         * 用户名
         */
        private String username;

        /**
         * 密码
         */
        private String password;

        /**
         * 盐
         */
        private String salt;

        /**
         * 手机
         */
        private String mobile;

        /**
         * 状态  0：禁用   1：正常
         */
        private Integer status;

        /**
         * 是否锁定用户：1.是  0否
         */
        private Integer isLock;

        /**
         * 登录错误次数
         */
        private Integer missNum;

        /**
         * 备注
         */
        private String remark;

        /**
         * 角色名称
         */
        private String roleName;

    }

    /**
     * 企业用户列表参数
     */
    @Data
    @ApiModel(value = "企业用户列表参数")
    class UserListParams{

        /**
         * 页码
         */
        @ApiModelProperty(value = "页码", name = "page", example = "1", required = true)
        private Long page;

        /**
         * 条数
         */
        @ApiModelProperty(value = "条数", name = "limit", example = "12", required = true)
        private Long limit;

        /**
         * 注册时间开始
         */
        @ApiModelProperty(value = "注册时间开始", name = "startTime", example = "2021-8-15 00:00:00", required = false)
        private Date startTime;

        /**
         * 注册时间结束
         */
        @ApiModelProperty(value = "注册时间结束", name = "endTime", example = "2021-8-20 00:00:00", required = false)
        private Date endTime;

        /**
         * 关键字
         */
        @ApiModelProperty(value = "关键字", name = "keyword", example = "企业", required = false)
        private String keyword;

    }

    /**
     * 用户注册参数
     */
    @Data
    @ApiModel(value = "用户注册参数")
    class UserRegisterParams{

        /**
         * 协会名称
         */
        @ApiModelProperty(value = "协会名称", name = "orgName", example = "昆明XXX协会", required = true)
        @NotNull(message = "协会名称", groups = {AddGroup.class})
        private String orgName;

        /**
         * 统一社会信用代码
         */
        @ApiModelProperty(value = "统一社会信用代码", name = "creditCode", example = "91230800MA18Y2U67G", required = true)
        @NotNull(message = "统一社会信用代码不能为空", groups = {AddGroup.class})
        private String creditCode;

        /**
         * 用户名
         */
        @ApiModelProperty(value = "用户名", name = "username", example = "13800000000", required = true)
        @NotNull(message = "用户名不能为空", groups = {AddGroup.class, UpdateGroup.class})
        private String username;

        /**
         * 真实姓名
         */
        @ApiModelProperty(value = "真实姓名", name = "userCnName", example = "吴XX", required = true)
        private String userCnName;

        /**
         * 密码
         */
        @ApiModelProperty(value = "密码", name = "password", example = "Qwert123456", required = true)
        @NotNull(message = "密码不能为空", groups = {AddGroup.class, UpdateGroup.class})
        private String password;

        /**
         * 短信验证码
         */
        @ApiModelProperty(value = "短信验证码", name = "smsCode", example = "12345", required = true)
        @NotNull(message = "短信验证码不能为空", groups = {AddGroup.class, UpdateGroup.class})
        private String smsCode;

        /**
         * 手机号码
         */
        @ApiModelProperty(value = "手机号码", name = "mobile", example = "13800000000", required = true)
        @NotNull(message = "手机号码不能为空", groups = {AddGroup.class, UpdateGroup.class})
        private String mobile;

    }

    /**
     * 用户忘记密码参数
     */
    @Data
    @ApiModel(value = "用户忘记密码参数")
    class UserForgetParams{

//        /**
//         * 用户名或统一和社会信用代码
//         */
//        @ApiModelProperty(value = "用户名或统一和社会信用代码", name = "username", example = "6-14位以字母开头的数字字母组合", required = true)
//        @NotNull(message = "用户名或统一和社会信用代码不能为空", groups = {AddGroup.class})
//        private String username;

        /**
         * 密码
         */
        @ApiModelProperty(value = "密码", name = "newPassword", example = "6-20位大小写字母和数字组合", required = true)
        @NotNull(message = "密码不能为空", groups = {AddGroup.class})
        private String newPassword;

        /**
         * 绑定手机号码
         */
        @ApiModelProperty(value = "绑定手机号码", name = "mobile", required = true, example = "13800000000")
        @NotNull(message = "手机号码不能为空", groups = {AddGroup.class})
        private String mobile;

        /**
         * 短信验证码
         */
        @ApiModelProperty(value = "短信验证码", name = "smsCode", required = true, example = "1234")
        @NotNull(message = "短信验证码不能为空", groups = {AddGroup.class})
        private String smsCode;

    }

    /**
     * 用户绑定手机号邮箱参数
     */
    @Data
    @ApiModel(value = "用户绑定手机号邮箱参数")
    class UserBindParams {
//        /**
//         * 用户ID
//         */
//        @ApiModelProperty(value = "用户ID", name = "userId", required = true, example = "3")
//        @NotNull(message = "用户ID", groups = {AddGroup.class})
//        private Long userId;

//        /**
//         * uuid
//         */
//        @ApiModelProperty(value = "uuid", name = "uuid", required = true, example = "7e7b00c5-7fae-4752-8ddd-befccdd1c358")
//        @NotNull(message = "uuid不能为空", groups = {AddGroup.class})
//        private String uuid;

//        /**
//         * 验证码
//         */
//        @ApiModelProperty(value = "验证码", name = "captcha", required = true, example = "7e7b")
//        @NotNull(message = "验证码不能为空", groups = {AddGroup.class})
//        private String captcha;

        /**
         * 手机号码
         */
        @ApiModelProperty(value = "手机号码", name = "mobile", required = true, example = "13800000000")
        @NotNull(message = "手机号码不能为空", groups = {AddGroup.class})
        private String mobile;

//        /**
//         * 邮箱
//         */
//        @ApiModelProperty(value = "邮箱", name = "email", required = true, example = "xxx123@qq.com")
//        @NotNull(message = "邮箱不能为空", groups = {AddGroup.class})
//        private String email;

        /**
         * 短信验证码
         */
        @ApiModelProperty(value = "短信验证码", name = "smsCode", required = true, example = "787411")
        @NotNull(message = "短信验证码不能为空", groups = {AddGroup.class})
        private String smsCode;
    }

    /**
     * 更换绑定手机号参数
     */
    @Data
    @ApiModel(value = "更换绑定手机号参数")
    class UserReplaceBindParams {
//        /**
//         * 用户ID
//         */
//        @ApiModelProperty(value = "用户ID", name = "userId", required = true, example = "3")
//        @NotNull(message = "用户ID不能为空", groups = {AddGroup.class})
//        private Long userId;

//        /**
//         * uuid
//         */
//        @ApiModelProperty(value = "uuid", name = "uuid", required = true, example = "7e7b00c5-7fae-4752-8ddd-befccdd1c358")
//        @NotNull(message = "uuid不能为空", groups = {AddGroup.class})
//        private String uuid;

//        /**
//         * 验证码
//         */
//        @ApiModelProperty(value = "验证码", name = "captcha", required = true, example = "7e7b")
//        @NotNull(message = "验证码不能为空", groups = {AddGroup.class})
//        private String captcha;

        /**
         * 旧手机号码
         */
        @ApiModelProperty(value = "旧手机号码", name = "oldMobile", required = true, example = "13800000000")
        @NotNull(message = "旧手机号码不能为空", groups = {AddGroup.class})
        private String oldMobile;

        /**
         * 旧手机号码短信验证码
         */
        @ApiModelProperty(value = "旧手机号码短信验证码", name = "oldSmsCode", required = true, example = "787411")
        @NotNull(message = "旧手机号码短信验证码不能为空", groups = {AddGroup.class})
        private String oldSmsCode;

        /**
         * 手机号码
         */
        @ApiModelProperty(value = "手机号码", name = "mobile", required = true, example = "13800000000")
        @NotNull(message = "手机号码不能为空", groups = {AddGroup.class})
        private String mobile;

//        /**
//         * 邮箱
//         */
//        @ApiModelProperty(value = "邮箱", name = "email", required = true, example = "xxx123@qq.com")
//        @NotNull(message = "邮箱不能为空", groups = {AddGroup.class})
//        private String email;

        /**
         * 短信验证码
         */
        @ApiModelProperty(value = "短信验证码", name = "smsCode", required = true, example = "787411")
        @NotNull(message = "短信验证码不能为空", groups = {AddGroup.class})
        private String smsCode;
    }
}
